Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test on CI that update-meson is properly ran #39527

Merged
merged 7 commits into from
Feb 21, 2025

Conversation

user202729
Copy link
Contributor

@user202729 user202729 commented Feb 14, 2025

Fixes #39172

Side note, can we just include the __init__.py to be tracked by git?

📝 Checklist

  • The title is concise and informative.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes. (not applicable)
  • I have updated the documentation and checked the documentation preview. (no documentation change? Do we need to mention this in developer guide somewhere?)

⌛ Dependencies

@user202729 user202729 marked this pull request as draft February 14, 2025 13:53
@user202729 user202729 force-pushed the check-update-meson branch 2 times, most recently from 74afe78 to 627262f Compare February 14, 2025 14:14
Copy link

github-actions bot commented Feb 14, 2025

Documentation preview for this PR (built with commit 6bf8c80; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

@user202729 user202729 marked this pull request as ready for review February 14, 2025 15:31
@orlitzky
Copy link
Contributor

Side note, can we just include the __init__.py to be tracked by git?

@tobiasdiez tried this once and it launched a months-long battle. It affects the sagemath-{objects,categories,etc} namespace packages. Though at this point they are unmaintained, nobody should be using them, and we could be more pragmatic about fixing whatever goes wrong.

Copy link
Contributor

@tobiasdiez tobiasdiez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Generally looks good to me, but I have a few suggestions for the ci code.

if: ${{ steps.check_update_meson.outcome == 'failure' }}
shell: bash -l {0}
run: |
git status
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this can be combined with the previous step.

Copy link
Contributor Author

@user202729 user202729 Feb 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't find some other good way to ensure simultaneously

  • test step is not run when build step (or some previous step) fails
  • test step is still run when update-meson step fails
  • update-meson is ran reasonably early so that in principle someone want to check the failure of this early can do so (though if it's after build step it is kind of moot anyway)

also the purpose of git diff is to print out the diff, there's no need to print out the diff when there's no change.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternatively we could just remove the whole continue-on-error and let the test not run when update-meson is not ran (which might not be that bad of an idea? If pull request author is quickly notified then they can quickly fix the thing and repush)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternatively we could just remove the whole continue-on-error and let the test not run when update-meson is not ran (which might not be that bad of an idea? If pull request author is quickly notified then they can quickly fix the thing and repush)

I would prefer this yes. It's the simplest method to maintain and also the one with the least surprising outcomes (if you forget to add a python file in the meson build, then you almost surely get 'confusing' test failures). Alternatively, you could argue that it's a kind of "linter"/checker and thus should be moved to the Lint workflow.

run: |
# Please see step 'Show files changed by update-meson' above and apply the changes,
# or run tools/update-meson.py locally
false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't quite understand the purpose of this check. Why would we want to have two steps that fail due to one reason?

Copy link
Contributor

@tobiasdiez tobiasdiez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM. Feel free to set it to positive review once the CI is green.

@vbraun vbraun merged commit cee1e2b into sagemath:develop Feb 21, 2025
20 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tools/update-meson.py is too undiscoverable
4 participants